package org.eae.eldf.webapp.controller.sys;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.eae.eldf.webapp.base.AbstractController;
import org.eae.eldf.webapp.common.bean.ResultList;
import org.eae.eldf.dto.sys.SysBusLogQueryDto;
import org.eae.eldf.entity.sys.SysBusLog;
import org.eae.eldf.framework.pager.Pagination;
import org.eae.eldf.service.sys.SysBusLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * ****************************************************************************
 * @File name   :      SysBusLogController.java
 *
 * @Author      :      bbqu
 *
 * @Date        :      2016-8-25
 *
 * @Copyright Notice: 
 * Copyright (c) 2016 Efast Serv. All  Rights Reserved.
 * This software is published under the terms of the Efast Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * 
 * ----------------------------------------------------------------------------
 * Date                   Who         Version        Comments
 * 2016-8-25 下午1:49:37        bbqu     1.0            Initial Version
 ****************************************************************************
 */
@Controller
@RequestMapping("/sys")
public class SysBusLogController extends AbstractController<SysBusLog>{
	
	private SysBusLogService sysBusLogService;
	@Autowired
	public void setSysBusLogService(SysBusLogService sysBusLogService) {
		this.sysBusLogService = sysBusLogService;
	}

	
	
	@RequestMapping(value="/busLog/list")
	public String listLogPage(ModelMap map,@RequestParam(required=false)String searchValue,HttpServletRequest request,HttpServletResponse response){
	
		return "/sys/busLog/sys_buslog";
	}

	
	@RequestMapping(value = "/BusLog/list_json")
 	public @ResponseBody ResultList<SysBusLog> pageList(
			HttpServletRequest request, 
			HttpServletResponse response,
			@ModelAttribute(value="sysBusLogQueryDto") SysBusLogQueryDto sysBusLogQueryDto
			){
		Pagination<SysBusLog> pager = super.newPaginationInstance(sysBusLogQueryDto);
		pager = sysBusLogService.queryListBusLog(pager, sysBusLogQueryDto);
		return outPageArrayList(pager, sysBusLogQueryDto);
	}
	
	

}
